package hyit.app.dao.proxy;

import java.util.List;

import hyit.app.dao.IGpsLocationDAO;
import hyit.app.dao.impl.GpsLocationDAOImpl;
import hyit.app.dbc.DatabaseConnection;
import hyit.app.model.GpsLocation;

public class GpsLocationDAOProxy implements IGpsLocationDAO {
	private DatabaseConnection dbc = null;
	private IGpsLocationDAO dao = null;
	public GpsLocationDAOProxy() throws Exception {
		this.dbc = new DatabaseConnection();
		this.dao = new GpsLocationDAOImpl(this.dbc.getConnection());
	}
	@Override
	public boolean doCreate(GpsLocation gps) throws Exception {
		boolean flag = false;
		try {
			flag = this.dao.doCreate(gps);
		} catch (Exception e) {
			throw e;
		}finally{
			this.dbc.close();
		}
		return flag;
	}

	@Override
	public GpsLocation getById(Integer id) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<GpsLocation> getByTeacherNumber(Integer number)
			throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

}
